<?php
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author 
 */
class News extends Validate
{
    //定义验证规则
    protected $rule = [
        'title|新闻标题'  => 'require',
        'content|新闻内容'   => 'require',
        '__token__' => 'token',
    ];

    //定义验证提示
    protected $message = [
         'title.require' => '请输入新闻标题',
         'content.require' => '请输入新闻内容',
        
    ];

    //定义验证场景
    protected $scene = [
        //更新
        'update'  =>  ['title','content'],
    ];
}
